const CracoLessPlugin = require('craco-less');
const path = require("path")
const resolve=(dir)=>path.resolve(__dirname,dir)

module.exports = {
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: { '@primary-color': '#1DA57A' },
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
  
  webpack:{
      alias:{  // 配置别名
        "@":resolve("src"),
        "comp":resolve("src/components"),
        "views":resolve("src/views"),
        "api":resolve("src/api"),
        "utils":resolve("src/utils")
      }
  }
};